<?php
/**
 * file:Logger.php
 * This file is part of J-Game.
 * @link https://www.liangboceo.com
 * @document https://doc.liangboceo.com
 * @contact 173120209@qq.com
 * @autho:jackliang
 */

namespace f4engine\engine;


class Logger
{
    public static function debug(...$args)
    {
        $str = "";
        foreach ($args as $value) {
            $str .= $value;
        }
        if (APP_DEBUG) {
            echo date("Y-m-d H:i:s") . "debug:" . $str.PHP_EOL;
        }

    }

    public static function info(...$args)
    {
        $str = "";
        foreach ($args as $value) {
            $str .= $value;
        }
        echo date("Y-m-d H:i:s") . "info:" . $str.PHP_EOL;
    }

    public static function warn(...$args)
    {
        $str = "";
        foreach ($args as $value) {
            $str .= $value;
        }
        echo date("Y-m-d H:i:s") . "warn:" . $str.PHP_EOL;
    }


    public static function alert(...$args)
    {
        $str = "";
        foreach ($args as $value) {
            $str .= $value;
        }
        echo date("Y-m-d H:i:s") . "alert:" . $str.PHP_EOL;
    }

}